#ifndef PBVP_POCKET_PLUGIN_H
#define PBVP_POCKET_PLUGIN_H

#include <QAction>
#include <QProgressBar>
#include "../toolplugin.h"

namespace PBVP {
	class PocketControl;
	///
	class PocketPlugin : public QObject, public ToolPlugin
	{
		Q_OBJECT
		Q_INTERFACES(PBVP::ToolPlugin)
	public:
		PocketPlugin();
		/// 
		~PocketPlugin();
		///
		virtual QString description() const {
			return QString("Compute pockets for proteins and general surfaces");
		} 
		/// 
		virtual void initialize(MainInterface* mainInterface);
		
		///
		virtual bool isSupported(DataNode* pNode);

		///
		virtual QAction* getToolAction() {
			return pocketSurfaceAction;
		}

		///
		virtual QMenu* getToolMenu() {
			return pocketMenu;
		}
	public slots:
		///
		void computePockets();
	
		/// 
		void computePocketVolume();

		///
		void refinePocket();

	private:
		QAction *pocketSurfaceAction;
		QAction *pocketVolumeAction;
		QAction *pocketRefineAction;

		QMenu *pocketMenu;
		QProgressBar *progressBar;

		DataManager *m_pDataManager;
		RenderManager *m_pRenderManager;
		FileExtensionManager *m_pFileExtManager;

		PocketControl *m_pControl;
	};
}
#endif